/**
 * Created by no1 on 2015/11/2.
 */

'use strict';
/**
 * Module sellPermission.
 */
let mongoose = require('mongoose');
var sellPermission = new mongoose.Schema({
  code: {
    type: Number,
    required: true,
    unique: true,
    index: true
  },
  //名称
  name: String,
  //父code 0没有
  pCode: {
    type: Number,
    index: true
  },
  //类型 1 总后台  2商家后台
  type: {
    type: Number,
    index: true
  },
  //创建时间
  createdAt: {
    type: Date,
    "default": Date.now
  },
  //最后更新时间
  updateAt: {
    type: Date,
    "default": Date.now
  },
  //状态 0删除 1可用
  status: {
    type: Number,
    index: true
  }
});
module.exports = mongoose.model('sellPermission', sellPermission);